package com.astrocsr.domain.web;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;

import com.astrocsr.common.helper.EncryptionHelper;
import com.astrocsr.common.util.DateUtil;

public class GroupAccount implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 1L;
	
	private Long groupAccountId;
	private String groupCode;
	private String accountNo;

	private String updatedBy;
	private Date createdDate;
	private Date updatedDate;
	private String createdBy;

	// extra
	private String groupName;
	
	// Constructors

	/** default constructor */
	public GroupAccount() {
	}

	public String getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}

	public Date getCreatedDate() {
		return createdDate;
	}
	
	public String getDisplayCreatedDate() {
		return (createdDate != null)? DateUtil.formatLocalDashTime(createdDate): "";
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	public Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getAccountNo() {
		return accountNo;
	}

	public String getAccountNoEn() {
		return StringUtils.isNotBlank(accountNo)? EncryptionHelper.encrypt(accountNo): accountNo;
	}
	
	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}

	public Long getGroupAccountId() {
		return groupAccountId;
	}
	
	public String getGroupAccountIdEn() {
		return (groupAccountId != null)? EncryptionHelper.encrypt(groupAccountId + ""): "";
	}

	public void setGroupAccountId(Long groupAccountId) {
		this.groupAccountId = groupAccountId;
	}

	public String getGroupCode() {
		return groupCode;
	}

	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
}